﻿using System;
using System.Collections.Generic;
using System.Text;

namespace Core.IBusiness.ISDK
{

    /// <summary>
    /// 付款密钥配置枚举
    /// </summary>
    public enum PayKeyEnum
    {
        /// <summary>
        /// 家里的
        /// </summary>
        窗帘店,

        /// <summary>
        /// 我的公司
        /// </summary>
        MyCompany,

        /// <summary>
        /// 学校的项目
        /// </summary>
        常青藤

    }

    /// <summary>
    /// 支付密钥管理
    /// </summary>
    public class PayKey
    {

        /// <summary>
        /// APPID
        /// </summary>
        public  string app_id { get; set; }

        /// <summary>
        /// 私钥
        /// </summary>
        public string privtekey { get; set; }

        /// <summary>
        /// 公钥
        /// </summary>
        public string publickey { get; set; }


        /// <summary>
        /// APi地址
        /// </summary>
        public string alipay_url = "https://openapi.alipay.com/gateway.do";

        /// <summary>
        /// 
        /// </summary>
        /// <param name="payType">付款类型</param>
        public PayKey(PayKeyEnum payType)
        {
            switch (payType)
            {
                case PayKeyEnum.窗帘店:
                    #region Config
                    app_id = "2018080360963012";
                    privtekey = "MIIEpAIBAAKCAQEAuyGJlYz4bDdVMsfr0thtVg9e98e1K77im2k8ny4jv9aEBRLWtrO8LCybJRkMMWNfpUywgsX2ME3UrRlWPUF9byvG7horGz6oDuS2b1fJ+h5x79ZsD/i/B5iy56nySYCe0W+5grudXpzZ0TTx+/dmhvW+qHBcdXnoOszyEWQrGItSKSr0lVIhuPp2XCHDvsW2UiH8LDueyNTPIvdCVMIyz6RZDGIubWUQisptD9tB0F7bVuhc4Lmz+xT57yT+Qm3znvbAfGKF952l5fBJbt7l589N6Z0u0Sytxdgq/ULHrs7fg2oM65QjrFkv2JIKmQ1Quf4Yu3mlbjlfIgaGsm0T/wIDAQABAoIBAQClrQipvliHPuoQfo4ca39JzWwQReDx7Rul6qNAb1I5W0whTc+JjFHSbl+hla6E321j5ST1cx0HITFlW+RNcXkDfyet0L9PbMbQANBAfeIVrvTDGf0smtdOe3QRxRX824JA/QCqbT7j8Eyse4quwRgl7taxPGGvpJHl1WOP4DaDj/k6K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0BAQEFAAOCAQ8AMIIBCgKCAQEAuyGJlYz4bDdVMsfr0thtVg9e98e1K77im2k8ny4jv9aEBRLWtrO8LCybJRkMMWNfpUywgsX2ME3UrRlWPUF9byvG7horGz6oDuS2b1fJ+h5x79ZsD/i/B5iy56nySYCe0W+5grudXpzZ0TTx+/dmhvW+qHBcdXnoOszyEWQrGItSKSr0lVIhuPp2XCHDvsW2UiH8LDueyNTPIvdCVMIyz6RZDGIubWUQisptD9tB0F7bVuhc4Lmz+xT57yT+Qm3znvbAfGKF952l5fBJbt7l589N6Z0u0Sytxdgq/ULHrs7fg2oM65QjrFkv2JIKmQ1Quf4Yu3mlbjlfIgaGsm0T/wIDAQAB";
                    #endregion
                    break;
                case PayKeyEnum.MyCompany:
                    #region Config
                    app_id = "2018021802223531";
                    privtekey = "MIIEowIBAAKCAQEAzUadn85ocLmrgrOyunaSuIWV+xc3OzMzUiDRJgBl0Y8HCXeV YZpUjUf7I5Ixj5l64HxZ9XRcHzSgu1bNUlW0CdscbrC6w6+U4ARaCu0lRoRJ6Ibo LE/eXmQftBG8uMYflVC34/ghNeWYLwg4APHWRqNrpFeumxvXvkHuBHTkv1vZZIet u9EweSJfKjXGtbOA2hGD+iTw5l/3GVAxOPuXODUuusHxEX5h+oSUyMY8p51pnmqh uaJCuFmoDA0pBp4npnnBUvzRTr7sxiuReJ+fgi1RbPGYfeI1sYG4WBtO2kpci5jW zwepJL4VG+qv4Ggeb8g6KbVe2aZnWwCMItXhwwIDAQABAoIBAGiNoxMWKpPfvb+g j1PxuOFLCQ0O0g7RET6vgFd+tF18H/VudyNzW8Vp+Dwx5hRh8/gK3jbqwVETmRpS J9nb1QuAEoc+dKHe+FDxZntSNj4oewx4SiDnvTcOgCdTMXBbWRLQPhla9G9jNZQe 94djpePssJLQJhrSn5xEMFsMvsXHtMSG+GsRDE9oSwROMhoE2/h8SK6wF1ZNVgyE 8Z+lEMjX+ylkZTm+59Jspej0X9bh1rDWtBE2hEtnfqHCn/XwvKTB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I5Ixj5l64HxZ9XRcHzSgu1bNUlW0CdscbrC6w6+U4ARaCu0lRoRJ6IboLE/eXmQftBG8uMYflVC34/ghNeWYLwg4APHWRqNrpFeumxvXvkHuBHTkv1vZZIetu9EweSJfKjXGtbOA2hGD+iTw5l/3GVAxOPuXODUuusHxEX5h+oSUyMY8p51pnmqhuaJCuFmoDA0pBp4npnnBUvzRTr7sxiuReJ+fgi1RbPGYfeI1sYG4WBtO2kpci5jWzwepJL4VG+qv4Ggeb8g6KbVe2aZnWwCMItXhwwIDAQAB";
                    #endregion
                    break;
                case PayKeyEnum.常青藤:
                    #region Config
                    app_id = "2018080360963012";
                    privtekey = "MIIEpAIBAAKCAQEAuyGJlYz4bDdVMsfr0thtVg9e98e1K77im2k8ny4jv9aEBRLWtrO8LCybJRkMMWNfpUywgsX2ME3UrRlWPUF9byvG7horGz6oDuS2b1fJ+h5x79ZsD/i/B5iy56nySYCe0W+5grudXpzZ0TTx+/dmhvW+qHBcdXnoOszyEWQrGItSKSr0lVIhuPp2XCHDvsW2UiH8LDueyNTPIvdCVMIyz6RZDGIubWUQisptD9tB0F7bVuhc4Lmz+xT57yT+Qm3znvbAfGKF952l5fBJbt7l589N6Z0u0Sytxdgq/ULHrs7fg2oM65QjrFkv2JIKmQ1Quf4Yu3mlbjlfIgaGsm0T/wIDAQABAoIBAQClrQipvliHPuoQfo4ca39JzWwQReDx7Rul6qNAb1I5W0whTc+JjFHSbl+hla6E321j5ST1cx0HITFlW+RNcXkDfyet0L9PbMbQANBAfeIVrvTDGf0smtdOe3QRxRX824JA/QCqbT7j8Eyse4quwRgl7taxPGGvpJHl1WOP4DaDj/k6KM+9neavnnTGLNycBA/EOiMFLrOFhrE3yMT/VULKx9yPq+gotg5kKOTG9CuxKBavmqYqZvhb2CWoqpggHVWVEap51/0b0S2CPO4Yz78Rhtc2HWLwVC9q9O8VSLeHPA8uxLbm/ibhFSUOUPcd4B6iFNdWtOmiQjn1cHj/mY95AoGBAOu1FmVhuj5lDT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OszyEWQrGItSKSr0lVIhuPp2XCHDvsW2UiH8LDueyNTPIvdCVMIyz6RZDGIubWUQisptD9tB0F7bVuhc4Lmz+xT57yT+Qm3znvbAfGKF952l5fBJbt7l589N6Z0u0Sytxdgq/ULHrs7fg2oM65QjrFkv2JIKmQ1Quf4Yu3mlbjlfIgaGsm0T/wIDAQAB";
                    #endregion
                    break;
            }
        }
    }
}
